<template>
<div>
    <el-row>
        <el-col :span="22" :offset="1">
            <el-steps :active="active" simple>
                <el-step title="楼盘概要描述" icon="el-icon-edit"></el-step>
                <el-step title="楼盘详细参数" icon="el-icon-document-copy"></el-step>
                <el-step title="上传楼盘相册" icon="el-icon-picture"></el-step>
                <el-step title="楼盘发布成功" icon="el-icon-check"></el-step>
            </el-steps>
        </el-col>
    </el-row>
    <el-row>
        <el-col :span="22" :offset="1">
            <BuildingProfile v-if="active==1" @next="next"></BuildingProfile>
            <BuildingDetailed v-if="active==2" @next="next" @pre="pre"></BuildingDetailed>
            <BuildingAlbum v-if="active==3" @next="next" @pre="pre"></BuildingAlbum>
            <BuildingRelease v-if="active==4" @pre="pre" class="sibu"></BuildingRelease>
        </el-col>
    </el-row>
</div>
</template>

<script>
// 概要
import BuildingProfile from "../components/BuildingProfile";
// 详细参数
import BuildingDetailed from "../components/BuildingDetailed";
// 相册
import BuildingAlbum from "../components/BuildingAlbum";
// 成功
import BuildingRelease from "../components/BuildingRelease";
import * as api from "../utils/api";

export default {
    name: "ReleaseProperty",
    components: {
        BuildingProfile,
        BuildingDetailed,
        BuildingAlbum,
        BuildingRelease,
    },
    data() {
        return {
            active: 1,
        };
    },
    methods: {
        next() {
            if (this.active < 4) {
                this.active++;
            }
        },
        pre() {
            if (this.active > 1) {
                this.active--;
            }
        },
    },
    created() {
        console.log(this.$route.query);
    },
};
</script>

<style lang="less">
</style>
